package token

import (
	"github.com/xinliangnote/go-gin-api/internal/pkg/core"
	"github.com/xinliangnote/go-gin-api/internal/repository/mongodb"
	"github.com/xinliangnote/go-gin-api/internal/repository/mongodb/apply_token"
	"github.com/xinliangnote/go-gin-api/internal/repository/mongodb/token"
)

var _ Service = (*service)(nil)

type Service interface {
	i()

	List(ctx core.Context, pageIndex uint, pageSize uint) (productList []apply_token.ApplyToken, err error)
	Count(ctx core.Context) (count int64, err error)

	TokenList(ctx core.Context, data *RequestServiceData) (productList []token.Token, err error)
	TokenCount(ctx core.Context) (count int64, err error)
	TokenCreate(ctx core.Context, tokenData *CreateTokenData) error
	TokenUpdate(ctx core.Context, tokenData *CreateTokenData) error
	Delete(ctx core.Context, tokenData *CreateTokenData) error
}

type service struct {
	db mongodb.Repo
}

func New(db mongodb.Repo) Service {
	return &service{
		db: db,
	}
}

func (s *service) i() {}
